package com.cy.stone.system.infrastructure.database.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

/**
 * 操作日志记录表 表定义层。
 *
 * @author Wings
 * @since 2023-12-14
 */
public class OperLogTableDef extends TableDef {

    /**
     * 操作日志记录表
     */
    public static final OperLogTableDef OPER_LOG = new OperLogTableDef();

    /**
     * 日志主键
     */
    public final QueryColumn ID = new QueryColumn(this, "ID");

    /**
     * 模块标题
     */
    public final QueryColumn TITLE = new QueryColumn(this, "title");

    /**
     * 主机地址
     */
    public final QueryColumn OPER_IP = new QueryColumn(this, "oper_ip");

    /**
     * 备注
     */
    public final QueryColumn REMARK = new QueryColumn(this, "REMARK");

    /**
     * 状态
     */
    public final QueryColumn STATUS = new QueryColumn(this, "STATUS");

    /**
     * 请求URL
     */
    public final QueryColumn OPER_URL = new QueryColumn(this, "oper_url");

    /**
     * 版本号
     */
    public final QueryColumn VERSION = new QueryColumn(this, "VERSION");

    /**
     * 创建人
     */
    public final QueryColumn CREATE_BY = new QueryColumn(this, "CREATE_BY");

    /**
     * 错误消息
     */
    public final QueryColumn ERROR_MSG = new QueryColumn(this, "error_msg");

    /**
     * 操作人员
     */
    public final QueryColumn OPER_NAME = new QueryColumn(this, "oper_name");

    /**
     * 更新人
     */
    public final QueryColumn UPDATE_BY = new QueryColumn(this, "UPDATE_BY");

    /**
     * 逻辑删除标识【0-未删除 1-已删除】
     */
    public final QueryColumn IS_DELETED = new QueryColumn(this, "IS_DELETED");

    /**
     * 请求参数
     */
    public final QueryColumn OPER_PARAM = new QueryColumn(this, "oper_param");

    /**
     * 创建时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "CREATE_TIME");

    /**
     * 返回参数
     */
    public final QueryColumn JSON_RESULT = new QueryColumn(this, "json_result");

    /**
     * 方法名称
     */
    public final QueryColumn METHOD_NAME = new QueryColumn(this, "method_name");

    /**
     * 操作状态（0正常 1异常）
     */
    public final QueryColumn OPER_STATUS = new QueryColumn(this, "oper_status");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "UPDATE_TIME");

    /**
     * 业务类型（0其它 1新增 2修改 3删除）
     */
    public final QueryColumn BUSINESS_TYPE = new QueryColumn(this, "business_type");

    /**
     * 请求方式
     */
    public final QueryColumn REQUEST_METHOD = new QueryColumn(this, "request_method");

    /**
     * 执行时间
     */
    public final QueryColumn COST_TIME = new QueryColumn(this, "cost_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TITLE, BUSINESS_TYPE, METHOD_NAME, REQUEST_METHOD, OPER_NAME, OPER_URL, OPER_IP, OPER_PARAM, JSON_RESULT, OPER_STATUS, ERROR_MSG, CREATE_TIME, CREATE_BY, UPDATE_TIME, UPDATE_BY, VERSION, STATUS, REMARK, COST_TIME};

    public OperLogTableDef() {
        super("", "ST_OPER_LOG");
    }

}
